package oop多态作业;
import java.util.Scanner;
public class TestPizza {

    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        Pizza pizza;
        System.out.println("请输入你要制作的比萨：（1.培根比萨 2.海鲜比萨）");
        int select=input.nextInt();
        if (select==1){
            System.out.println("请输入培根克数：");
            int grammage=input.nextInt();
            System.out.print("请输入比萨大小：");
            int size=input.nextInt();
            System.out.print("请输入比萨价格：");
            double pirce=input.nextDouble();
            pizza=new Bacon("培根比萨",pirce,size,grammage);
            pizza.show();
        }else {
            System.out.println("请输入配料：");
            String  burdening=input.next();
            System.out.print("请输入比萨大小：");
            int size=input.nextInt();
            System.out.print("请输入比萨价格：");
            double pirce=input.nextDouble();
            pizza=new Seafood("海鲜比萨",pirce,size,burdening);
            pizza.show();
        }
    }
}
